#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int n, k;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n >> k;
		if (!k) {
			for (int i = 1; i <= n / 2; i++) {
				cout << i << " " << -i << " ";
			}
			if (n & 1)cout << 0 << endl;
		}
		else {
			if (n & 1) {
				for (int i = 1; i <= n / 2; i++) {
					cout << i << " " << -i << " ";
				}
				cout << k << endl;
			}
			else {
				for (int i = 1; i <= n / 2 - 1; i++) {
					cout << i << " " << -i << " ";
				}
				cout << 0 << " " << k << endl;
			}
		}
	}
	return 0;
}